package com.itheima.service.mongo;

import com.itheima.domain.db.Movement;
import com.itheima.domain.db.Visitor;
import com.itheima.vo.PageBeanVo;
import org.bson.types.ObjectId;

/**
 * @author zsk
 * @create 2022-03-17-16:33
 */
public interface MovementService {

    //发表动态
    void saveMovement(Movement movement);

    //查询我的动态
    PageBeanVo findByMovementPage(Long userId, Integer pageNum, Integer pageSize);

    //获取好友动态
    PageBeanVo findByFriendMovement(Long userId, Integer pageNum, Integer pageSize);

    //查询推荐动态
    PageBeanVo findRecommendMovementByPage(Long userId, Integer pageNum, Integer pageSize);

    //根据publishId查询动态详情
    Movement findById(ObjectId id);

    //设置访问记录
    void saveVisitor(Visitor visitor);

    //后台分页查询动态列表
    PageBeanVo findMovementByPage(Long userId,Integer state,Integer pageNum,Integer pageSize);

    //更新动态信息
    void update(Movement movement);
}
